<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/mpd/config/config.php');


//$nip = $_SESSION['NIP'];
$rev = $_GET['id'];

//baca tabel pekerjaan, jenis_pekerjaan dan status_pekerjaan
$query=mysql_query("SELECT p.ID_PEKERJAAN as id ,p.NAMA_PEKERJAAN as nama ,b.NAMA as peg ,j.JENIS_PEKERJAAN as jenis ,p.DETIL_PEKERJAAN as ket,p.DUE_PEKERJAAN as due,s.STATUS_PEKERJAAN as status FROM pekerjaan as p INNER JOIN jenis_pekerjaan as j ON p.ID_JENIS=j.ID_JENIS INNER JOIN status_pekerjaan as s ON p.ID_STATUS_PEKERJAAN=s.ID_STATUS_PEKERJAAN INNER JOIN biodata as b ON p.NIP=b.NIP where  p.ID_PEKERJAAN = ".$rev);  
//$query=mysql_query("SELECT p.ID_PEKERJAAN as id ,p.NAMA_PEKERJAAN as peg ,b.NAMA as nama ,j.JENIS_PEKERJAAN as jenis ,p.DETIL_PEKERJAAN as ket,p.DUE_PEKERJAAN as due,s.STATUS_PEKERJAAN as status FROM pekerjaan as p INNER JOIN jenis_pekerjaan as j ON p.ID_JENIS=j.ID_JENIS INNER JOIN status_pekerjaan as s ON p.ID_STATUS_PEKERJAAN=s.ID_STATUS_PEKERJAAN INNER JOIN biodata as b ON p.NIP=b.NIP where p.NIP =11 AND p.ID_PEKERJAAN =1");

	while($row = mysql_fetch_array($query)){
		
		$temp = array(

			'id_pekerjaan'		=> $row['id'],
			'pekerjaan'			=> $row['nama'],
			'peg'				=> $row['peg'],
			'jenis_pekerjaan' 	=> $row['jenis'],
			'duedate'         	=> $row['due'],
			'keterangan'      	=> $row['ket'],
			'status'          	=> $row['status']
		);
		}
?>